

#ifndef xhttp_str_hpp
#define xhttp_str_hpp

#include <stdio.h>

typedef struct xhttp_str_st * xhttp_str_t;

typedef void * xhttp_str_msg_t;

const char *xhttp_str_msg_path(xhttp_str_msg_t m);

typedef void (*xhttp_str_callback_t)(xhttp_str_t obj, void * cbcontext, int status_code, const char * response, int response_length, xhttp_str_msg_t msg);



xhttp_str_t xhttp_str_create();

void xhttp_str_delete(xhttp_str_t obj);

int xhttp_str_post_json(xhttp_str_t obj, const char * url, const char * json, int json_length
                        , xhttp_str_callback_t callback, void * cbcontext);

void test_xhttp_str();

#endif /* xhttp_str_hpp */
